/**
 * 差异对比相关的类型定义
 */

// 差异对比状态
export interface DiffViewState {
  leftFile: FileReference | null
  rightFile: FileReference | null
  diffResult: DiffResult | null
  viewMode: 'side-by-side' | 'inline'
}

// 差异结果
export interface DiffResult {
  additions: number
  deletions: number
  modifications: number
  chunks: DiffChunk[]
}

// 差异块
export interface DiffChunk {
  type: 'add' | 'delete' | 'modify' | 'context'
  oldStart: number
  oldLines: number
  newStart: number
  newLines: number
  lines: DiffLine[]
}

// 差异行
export interface DiffLine {
  type: 'add' | 'delete' | 'context'
  oldNumber?: number
  newNumber?: number
  content: string
}

// 文件引用 (从 history.ts 重新导出)
import type { FileReference } from './history'
export type { FileReference }